<?php session_start();
	include('../controller/functions.php');
	User::connection();



 echo' <table width="100%" border="0" style="background:#ffffff;border-color:#5c481a;border-width:1px;border-style:solid;">';

	
		
echo '<tr><td style="background-color:#1a2701;
color:#FFFFFF;
font-weight:bold;" colspan="2">ENGLISH</td>
</tr>';
	
			//retrieving all the content from the home table
$sql = "SELECT * FROM `tblexam` WHERE category = 'english' ORDER BY questionId DESC";
			$result = mysql_query($sql);
			$num_rows = mysql_num_rows($result);
			for($x=0 ; $x < $num_rows ; $x++){
				if (($i%2)==0){
							$bgColor ="#ffffff"; 
						}else{
							$bgColor = "#fcdede";
						}
				
				$qID = mysql_result($result,$x,"questionId");
				$qDesc = mysql_result($result,$x,"questionDesc");
				$qAnswer = mysql_result($result,$x,"questionAnswer");
				$qChoiceA = stripslashes(mysql_result($result,$x,"chooseA"));
				$qChoiceB = stripslashes(mysql_result($result,$x,"chooseB"));
				$qChoiceC = stripslashes(mysql_result($result,$x,"chooseC"));
				$qChoiceD = stripslashes(mysql_result($result,$x,"chooseD"));
				$active2 = stripslashes(mysql_result($result,$x,"active"));
				
	if($active2=='1')
	{
	$active='ACTIVE';
	}
	else {
	$active='HIDDEN';
	}
	
		echo "<tr bgcolor='#fcdede'><td colspan='2'>Question ID#$qID<br/>  $qDesc</td>
								
	</tr>
		<tr><td colspan='2'>Answer  : $qAnswer  |  <b>$active</b></td></tr>	
<tr><td width='10'></td><td>a) $qChoiceA</td></tr>
<tr><td width='10'></td><td>b) $qChoiceB</td></tr>
<tr><td width='10'></td><td>c) $qChoiceC</td></tr>
<tr><td width='10'></td><td>d) $qChoiceD</td></tr>
<tr><td>&nbsp;</td></tr>

";	
		echo '</p>';	
		$i++;	 	} 


		
	echo'<table><br/>';

?> 